package com.geeguo.ebuilder.operation.business.system.role.service;

import com.geeguo.ebuilder.core.common.model.vo.PageListVO;
import com.geeguo.ebuilder.operation.business.system.role.model.RoleEntity;
import com.geeguo.ebuilder.operation.business.system.role.model.RoleQuery;
import com.geeguo.ebuilder.operation.business.system.role.model.RoleVO;

import java.util.List;
import java.util.Set;

public interface RoleService {

    PageListVO<RoleVO> list(RoleQuery query);
    List<RoleVO> listAll();
    Set<String> listIdByUser(String userId);
    Set<String> listCodeByUser(String userId);

    RoleVO get(String id);
    RoleVO getByCode(String code);

    boolean save(RoleEntity entity);
    boolean update(RoleEntity current, RoleEntity old);
    boolean remove(String id);
    boolean isUsed(String id);
}